package basic;

public class AbstractClass {
    public static void main(String[] args) {
        Car car = new Car();
        car.run();
        car.maintain();
        Plane plane = new Plane();
        plane.run();
        plane.maintain();

    }
}

abstract class TransportionFacility {
    public abstract void run();
    public abstract void maintain();
}


class Car extends TransportionFacility{
    @Override
    public void run() {
        System.out.println(this.getClass() + " running");
    }

    @Override
    public void maintain() {
        System.out.println(this.getClass() + " maintaining");
    }
}

class Plane extends TransportionFacility{
    @Override
    public void run() {
        System.out.println(this.getClass() + " flying");
    }

    @Override
    public void maintain() {
        System.out.println(this.getClass() + " maintaining");
    }
}
